﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Job.Web.Framework;
using System.Data;
using Job.Logic.Common;

namespace Job.Web.userControls.Public
{
    public partial class Category : BaseCtrl
    {
        int categoryId
        {
            get
            {
                return myR["categoryid"].IntValue;
            }
        }

        int subjectid = myR["subjectid"].IntValue;

        protected void Page_Load(object sender, EventArgs e)
        {

            if (!Page.IsPostBack)
            {
                this.LoadData();
            }
        }

        private void LoadData()
        {
            SubjectLogic logic = new SubjectLogic();
            //梆定一级栏目的信息像"猎头专区"
            DataTable dttitle = logic.GetMenuTitle();
            DataRow[] drList = dttitle.Select("category_id=" + categoryId);
            if (drList.Length > 0)
            {
                menuTitleTB.Attributes.Add("class", drList[0]["CSS"].ToString());
                menuTitleTD.InnerText = drList[0]["title"].ToString();
            }
        }
    }
}